package fun.hijklmn.magic.image.server.controller;

import fun.hijklmn.magic.image.common.pojo.Image;
import fun.hijklmn.magic.image.server.service.ImageAdminService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author fs
 * @Date 2021/5/7 11:54
 * @Version 0.0.1-SNAPSHOT
 **/
@Api(value = "图片管理后台接口", tags = "图片服务前端控制器")
@RestController
@RequestMapping("admin")
public class ImageAdminController {

    @Autowired
    private ImageAdminService imageAdminService;

    @ApiOperation(value = "保存图片", tags = "图片服务前端控制器")
    @PutMapping("/save")
    public Image save(Image image) {
        return imageAdminService.save(image);
    }

}
